﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using System.Data.Linq;

namespace Soussous.Business
{
    [Table(Name = "users")]
    public class User : Identifiable
    {
        private int id;

        [Column(Storage = "id", IsPrimaryKey = true, CanBeNull = false, DbType = "Int NOT NULL IDENTITY",IsDbGenerated = true)]
        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        private string lastname;

        [Column(Storage = "lastname")]
        public string Lastname
        {
            get { return lastname; }
            set { lastname = value; }
        }


        private string firstname;

        [Column(Storage = "firstname")]
        public string Firstname
        {
            get { return firstname; }
            set { firstname = value; }
        }


        private string email;

        [Column(Storage = "email")]
        public string Email
        {
            get { return email; }
            set { email = value; }
        }

        private string password;

        [Column(Storage = "password")]
        public string Password
        {
            get { return password; }
            set { password = value; }
        }

        public override string ToString()
        {
            string text = "Id = " + this.Id + ",Lastname = " + this.Lastname;
            return text;
        }
    }
}
